[IA64] xenoprof: fix xenoprof_shared_gmfn()
authorAlex Williamson <alex.williamson@hp.com>
Mon, 17 Dec 2007 16:33:52 +0000 (09:33 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Mon, 17 Dec 2007 16:33:52 +0000 (09:33 -0700)
fix panic after xenoprof shutdown as follows.
(XEN) Xen BUG at mm.c:1265
(XEN) FIXME: implement ia64 dump_execution_state()
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Xen BUG at mm.c:1265
(XEN) ***************************************

The c/s 14624:64ab7d443549 changed the p2m table semantics so that
xenoprof_shared_gmfn() also needs catch it up.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/include/asm-ia64/xenoprof.h

index 1d917532b5b8ea9919ed581cd0ce20e32c092fbb..f5ac2a6f5db4dac13bbe70a0da2dcb63e6135020 100644 (file)
@@ -48,8 +48,13 @@ static inline void xenoprof_backtrace(
     /* To be implemented */
     return;
 }
-#define xenoprof_shared_gmfn(d, gmaddr, maddr)  \
-    assign_domain_page((d), (gmaddr), (maddr));
+#define xenoprof_shared_gmfn(d, gmaddr, maddr)                      \
+do {                                                                \
+    unsigned long ret;                                              \
+    ret = create_grant_host_mapping((gmaddr),                       \
+                                    (maddr) >> PAGE_SHIFT, 0, 0);   \
+    BUG_ON(ret != GNTST_okay);                                      \
+} while (0)
 
 static inline int
 ring(const struct pt_regs* regs)